package org.kernely.ui.mvp;

/**
 * Abstract KernelyPresenter, defines all needed method for the Kernely's Presenters
 */
public abstract class KernelyPresenter<T extends IKernelyView> implements IKernelyPresenter<T>{

	/**
	 * The view associated to this presenter
	 */
	protected T view;
	
	@Override
	/**
	 * @see IKernelyPresenter#bind()
	 */
	public abstract void bind();

	@Override
	/**
	 * @see IkernelyPresenter#getView()
	 */
	public IKernelyView getView() {
		return this.view;
	}

	@Override
	/**
	 * @see IkernelyPresenter#setView(IKernelyView)
	 */
	public void setView(T view) {
		this.view = view;
		this.bind();
	}
	
	/**
	 * @see IKernelyPresenter#unset()
	 */
	@Override
	public void unset(){}
	
}
